/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package EntityBeans;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Keith Augustsson
 */
@Embeddable
public class GroupbookingPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "leader")
    private String leader;
    @Basic(optional = false)
    @Column(name = "member")
    private String member;

    public GroupbookingPK(String leader, String member) {
        this.leader = leader;
        this.member = member;
    }

    public String getLeader() {
        return leader;
    }

    public void setLeader(String leader) {
        this.leader = leader;
    }

    public String getMember() {
        return member;
    }

    public void setMember(String member) {
        this.member = member;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (leader != null ? leader.hashCode() : 0);
        hash += (member != null ? member.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof GroupbookingPK)) {
            return false;
        }
        GroupbookingPK other = (GroupbookingPK) object;
        if ((this.leader == null && other.leader != null) || (this.leader != null && !this.leader.equals(other.leader))) {
            return false;
        }
        if ((this.member == null && other.member != null) || (this.member != null && !this.member.equals(other.member))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "EntityBeans.GroupbookingPK[leader=" + leader + ", member=" + member + "]";
    }

}
